<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
    String path = request.getContextPath(); //web项目的根路径
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">
div.loginDiv {
	width: 500px;
	margin: 50px auto;
	background-color: #EEE;
	padding: 20px 50px;
	text-align: center;
	position: relative;
}

a, input {
	border: 0;
	background-color: #0099E6;
	margin: 5px 20px;
	padding: 10px;
	box-shadow: 2px 2px 2px rgba(0, 0, 0, .3);
	border-radius: 5px;
	text-decoration: none;
	color: white;
}

a {
	font-size: 12px;
}

div.list {
	width: 500px;
	margin: 50px auto;
	background-color: #EEE;
	padding: 20px 50px;
	text-align: center;
	position: relative;
}

table {
	width: 100%
}

table tr th, td {
	border: 1px solid #FFF;
	width: 33%;
}

a {
	border: 0;
	background-color: #0099E6;
	margin: 5px 20px;
	padding: 10px;
	box-shadow: 2px 2px 2px rgba(0, 0, 0, .3);
	border-radius: 5px;
	text-decoration: none;
	color: white;
}
</style>
</head>
<body>
	<div class="loginDiv">
		<h2>用户查询</h2>
		<form action="searchUserByName">
			<div>
				<label>帐号：</label> <input type="text" name="userName"> <input
					type="submit" value="查询">
			</div>
		</form>
		<c:if test="${!empty userList }">
			<table>
				<thead>
					<tr>
						<th>ID</th>
						<th>帐号</th>
						<th>密码</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${userList }" var="user">
						<tr>
							<td>${user.userId }</td>
							<td>${user.userName }</td>
							<td>${user.userPassword }</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</c:if>
		<c:if test="${!empty msg }">
			<h1>${msg }</h1>
		</c:if>
		

	</div>
</body>
</html>